package weaver.interfaces.dsjj.duss.util;

/**
 * @Title: ecology-9-demo
 * @Company: 泛微软件
 * @author: weaver.Dusongsong
 * @version: 1.0
 * @CreateDate: 2020-06-10
 * @Description: ${description}
 * @ModifyLog:
 **/

import java.io.*;

/**
 * @author ipodao@qq.com
 * @date 2019/9/4 16:05
 */
public class ExportFile {
    public static void main(String[] args) {
        ExportFile apk = new ExportFile();
       /* String infilePath = EXPORT_PATH + "test.txt";
        String outfilePath = EXPORT_PATH + "hex.txt";
        apk.fileToHex(infilePath, outfilePath);*/
        //hex val
        String content = "504B03040A0000000000874EE24000000000000000000000000009000000646F6350726F70732F504B0304140000000800874EE240FDFDCB8A5D0100007002000010000000646F6350726F70732F6170702E786D6C9D91CD6EC2301084EF95FA0E51EE8993F0D31419231ACAA96A9108E5882C6721561DDBB20D82B7AFD35421BDF6B6332B8F3FEDE0C5B511C1058CE54ACEC3344EC20024531597A779B82BD7511E06D6515951A124CCC31BD870411E1FF0C6280DC671B0818F90761ED6CEE9194296D5D0501BFBB5F49BA3320D755E9A1352C72367B052ECDC8074284B922982AB03594115E93E30EC126717F7DFD04AB196CF7E9637ED81092EA1D1823A20EF2D8E882BE51A8C7A176FE8092C4931EA06BC57A6B224C1A81B7051534399F3776ACD81C26F5CFA97DEEC069F64E8C9505DFF9803854BE5A828790364E4BFEE05DE322AA0F0B8E44885058CEE469BFE6577BA54AB16FE77FFD71CB0EDB9ABB79AB20EE84E39F0F1526BC11975BE6FB2DF6C838F9F4E0E691AFBF2E33CCFB2C33A7D1D654F2F45944D9F8B683C9A54D1329D6451322926E3244F92AC5862340CC2BED32DB0B3E1EED6DE6228FD4DFB66C937504B0304140000000800874EE240490A9F41640100008202000011000000646F6350726F70732F636F72652E786D6C8D92C14AC3401086EF82EF10F69EEC6E42A3599214547AB22058517A5B76A76D30D984DDB5696FFA269E7D06C18711C4C73049D358D183C7E1FFE79B7F76361E6F8ADC59833659A912443D821C50A294995A26E86636714F91632C5792E7A582046DC1A0717A7C148B8A8952C3952E2BD03603E334246598A812B4B2B662181BB182821BAF71A8465C94BAE0B629F512575CDCF325609F90101760B9E496E316E8560311F548290664F5A0F30E2005861C0A50D660EA51FCEDB5A00BF36743A71C388BCC6EAB66A73EEE215B8A9D38B837261B8C755D7B75D0C568F2537C37BDBCEE567533D5BE950094C65274E398D0C02D48A701B0DDB8BD721B9C5FCC2628F5098D5C72E2D2684622165046C83CC67B57DFDF0277AC52A7CEDCFB787E753E5FDEDE1F9F5AEBA0B467C9B9B1D3E6828B0CE4D9360D48148EC2308AF16F6D4859F4FE7FC4F4FD19F1D988B0517010730F48DB041AD659FBA152DA0D1DCAAEFAF96BD22F504B0304140000000800874EE240E931E22CFE0000007F01000013000000646F6350726F70732F637573746F6D2E786D6C9D904D4BC4301445F782FF21649F268D54DB9276B0EDCCC68582E3EC4B9ACE049A0F92B45AC4FF6E86D171EFF2711F87732FDB7CA8092CC279697405D3844020343783D4C70ABEED772887C0875E0FFD64B4A8E02A3CDCD4B737ECC5192B5C90C28388D0BE82A7106C89B1E727A17A9FC458C764344EF5219EEE88CD384A2E3AC3672574C094907BCC671F8C42F68A83175EB984FF2207C3CF76FEB05F6DD4ADD90F7C05A30A72A8E06797B55D97910CD16DD1A294A40D2AEE8A074472426843DB5DF1B8FD82C09E9F2904BA57B1FAD3EB73C40E330FCD2CA7E1205C442FA19CECBB0FAEA624A3284D93B86192E79432FC9731FCAB50337C76BB2C577F03504B03040A0000000000874EE24000000000000000000000000005000000776F72642F504B0304140000000800874EE2402BC523E9F9090000186800000F000000776F72642F7374796C65732E786D6CBD5D5B739B48167EDFAAFD0F144FBB0F8E6CC7634F5C51A6E2DB3A3576D65BB2679E5BD0B27A02B4B601CBCAAFDFD3DD8089041DF581B34FB690F8BEC3B97CF4153EFEF69A26C10B57B990D9343C7A7718063C8B642CB2E769F8F47873F06B18E405CB6296C88C4FC30DCFC3DF3EFDFD6F1FD7E779B149781E0040969FA7D1345C16C5EA7C32C9A3254F59FE4EAE78065F2EA44A59011FD5F32465EA5BB93A8864BA6285988B44149BC9F1E1E16958C1C86958AAECBC82384845A4642E17853EE55C2E1622E2D59FFA0CB50FAF3DF34A4665CAB3C2304E144FC00699E54BB1CA6BB4148B0697B8AC415E5C17F19226F5EFD6FB90ADA58A574A463CCF212669628D4F99C81A98A3931DA0C671EFC071137BF9130D05A71F1D9AFF5A761C1DBA2CAEDCAECFAE29F36487B123DA368A7762AE98B2618604D076A7D1F997E74C2A364F20A5D64727E127C8A75846577CC1CAA4C8F547F5A0AA8FD527F3E74666451EACCF591E09F108890600A900ACDBCF592E42F866A9FFE9FC86B3BCF89C0BD6FEF2BA3AA6CF8CF2A205782162114E3E7D9C1853EABF8D497078CB60482748AE99AD0A409365564CC3E3532829F82D5FFCE7C654C234AC0F3C654B11F33F973C7BCA790CD557FD70C653712BE298EB8AAC8E3D7D7950422AA89769F8E14375F04E46DF783C2B8058A36A0725797CFD1AF195CE6CA0FD6FCD6970CA2D42634829DE90CD81BC456F0E644C7BF9ABB63ED11EA1645972A6B52738DA8768DB726B680D713C1CE2FD708893E110BF0C87381D0E71361CE2D7E1101F3A210625B6C862FEDA9370230077A7E108C0DDC939027077CA8E00DC9DC8230077A7F708C0DD493F027077298C004C5020858C28CA43C31214878625280D0D4B50181A96A02C342C415168588292D0B00405A16109CAC13684822F70DBC88AF16F470B298B4C163C28F82B013CCB00DC747C880874F38B2B1ABF50E0DADB7FD568EC347BAB11DDDDEA8C98697377020C92F542F79202B90816E2B954D0FDEE6A810F62E0D90B4FA0FF16B03806024A06C50BE8DF8F7F094DD128BEE00A4630F8F81CADCA21644944C683AC4CE714B9BE62CF74E03C8B8D6E113AA7A6A091C6A6D258592C755F5B50545BCA604C6BFCEC2C240B5C22364821EE444E702BD2A8C14599249C0AFC2B511D19CB09DAAE0697A0F16A704FC64F3A834BD07C35B8363328BA086D782A6F57D65339BD82A7F2BD2D1C32DF57F054BEAFE0A97C5FC177FB7EABB13864C4F5511409413BE632917A2A617C359889E78C41FBAEDB668C63EC806E35E61E3C30C59E155B2D033D0B30BEFD1732DE048F24BDAE069AACDB6834ED12FC22B2B23B00835B00410D4FA60B0D019532340454DAD01074ABC3A018DC43DF4C37E06FFB7BD89822EB99EF9995F3824680662C29ED10C4F8357C057361E3A3BE95EF8D50D068A51AFBE9E6A128B7AF7A84492712C99DE0ED3A081AC96FE0042AF1066E634CE1FB1D0E8AEB48606E98E86676BB597105E314DFC62FB41B992472CD6337C5982A5728D9D3161A91E53A5D2D592EF2F11D7655AD6909EED96A7CF48704D66B1065D1F5012C06490277A371D0FDB21AA8FFC79F7CFECFF17D73FB787F177C86B19C6C9352A1538DC71ADB2F05C5ADD242CB98E02E6CA0A1332032189A9304A3C886E077BE994B066B9D461F6737F00F303C6AD601159C8A62C6D21545C7D1D8FF08E2BF86B1518AE16943F00753424F7974FA1FA3C9EDE54BC1632FF420A969CD0DE4E5FC2F1E11744F8DE9A0973AB814F3F13FE013B4DB7EC02768F258FCCB84C14A4992050B3F129079A8BE02721711F4812B17C944AA4599D065E965CD4017859A812E0C3229D32C27759221A0F4912120771165A69A2B2018ADB1A5F02F2562BA081B74B2F01A74B2D81A74B2C01A74DAA812ACAF6AE50CC132AB163AC16A2B8B6E86A1BB176F0F6A60B5D0C9F2DDD84E96EF069D2CDF0D3A59BE1B74B27C37E864F96ED0C9F2FDFD55C0170B68EF13DEC75B1C64B9DFE220AB003D37C2D315ECFB519BCEDEDD080A719DF0674631396805E841C985DE8925B39EAD30235C829E7821EDE1597CB25482E136BA168F0627B59C20FB2F180C6AC3762C9AA9E5B7BB3A554D99FD723870BBF9AD6786F14E3C2F8B60B61C3009756AF6B539F1B5FE238D3FD6FBEC9CE0BA9989047FEF00BFE7B128D3DA35D86A3A3DD99F025953A7BFFC9CC2DC80914DC253D819DC1B82CA4B061F6BFFD9CFF14D57026B3F6C9FFE99FD061F6BBFD90ADA93A2957F0C3E52D6CE5C3B42AF603777802FAF3357ED36033C83E4E1CC55C10DC5804B701571833F40245CEEFF413E61262A82ED2868A970C5C21299321BC8E20A876531C93A90C515946D651DEA371F891DCAB5B7D60E25DA5B748712EDADBE4389F696E1A1447BEBF140A2FD847928894B151A79AB147A28974B1B1AAE1144E8CC250F0DD1183AE42DDED846802B4CBBE28D6571056857BCB12CAEE8F48937960B23DE582E6FF1C612798B3796C85BBCB144DEE28D25F2166F24919F7863495CAAD0E8DC967863B95CDAD070B5C51B4BE4928786A82DDE48A2FD072EEAFB1EB287B5E708C65016578076C51B7B2DAEE8F48937960B23DE582E6FF1C612798B3796C85BBCB144DEE28D25F2166F24919F78634930E28DE5726943A3A96DF1C612B9E4A1216A8B3792C85FBC91F3B29EE28D6571056857BCB12CAEE8F48937960B23DE582E6FF1C612798B3796C85BBCB144DEE28D25F2166F24919F78634930E28DE5726943A3A96DF1C612B9E4A1216A8B3792C85FBC91CB5E3CC51BCBE20AD0AE7863595CD1E9136F2C1746BCB15CDEE28D25F2166F2C91B7786389BCC51B4BE42DDE48223FF1C69260C41BCBE5D2864653DBE28D2572C94343D4166F2491BF782357157A8A3796C515A05DF1C6B2B8A2D327DE582E8C7863B9BCC51B4BE42DDE58226FF1C612798B3796C85BBC91447EE28D25C1883796CBA50D8DA6B6C51B4BE4928786A82DDE86081E50DF7E22BD7E6CBB796303AC472A600FE7345CD58FD3D14B94E0F9F4FAC9FBD503E7CD0FBF9847D2EBF3F40E4AF8CD0B83C7FEB71F035FEDC6341B65DF1E235FFFF2D02E8C5B3D288DB116B15CEB15C04A265BBFF82BAA0FCC25BC4501E0C0F6EA34780B803E5BFDFF9FFBBF3EFFC6957E86BEB9EC6A1A21FFDE1CA85684E5DF2FF5FB08EC8FEA2E0F8327D857C77876F034D31EAEDF3E300DBF2F0F2EBFEA437378C5C03464EA60F6B9BA6A73B970F52600BB218B9610B348EFBD85B37B42665FA6D00E99EBF9496F4BC74C14F78868BF7585D95BDB6FD9B1794341DBB26A87BE59C26AB3C5DF1E48E77962B304FEB9631B59166083CDF18578ADB759C397973C49EE9949A842AEE047F0060E33496F7F1CBF326B44C2171A02BE3D3A3442BCF53DA46921D3FEF39559D8DA0B001E6C1B633FEA2BD8C3B54D65BEDF71E6F642E03983B74AFC7B3B8389EAB41D830B785308BC5146A7AF75B3290EFDCC31D8D50D5E8BF4D64AC8FBB290FA63FE7D1ADA56C98A45E6451676E7BD0D02EADC2640A8B3EBF0A14E16F0F69198DFC2750D38FD0FDCE93693DAEEEF2F88AEACABF32FFFF43F504B0304140000000800874EE2407F3F215B23040000240A000011000000776F72642F73657474696E67732E786D6CB5565B6FDB36147E1FB0FF60E8DDB1E4C87623D4291C3B6E52D86D5025DB33251D5B5C781148CAAAF3EB77288A51362741D1614FA2CEFDFA911F3FFDE06C7000A5A914F3203A0B8301885C1654ECE7C1C3FD7AF82118684344419814300F8EA0834F97BFFFF6B149341883627A8026844E783E0F4A63AA6434D279099CE833598140E64E2A4E0CFEAAFD8813F55857C35CF28A189A5146CD71340EC369D09991F3A05622E94C0C39CD95D47267AC4A22773B9A43F7F11AEA67FC3ACD95CC6B0EC2B41E470A18C620852E69A5BD35FEABD630C5D21B39BC97C481332FD744E17B925DBA8D54C5B3C6CF8467152A2573D01A1BC4994B97132A9ECD44F189A1E7529F61A947CEF7C89A42F5286C4F7DE49A9DE8BFD26DD7C50DCD1451AECD3800360A9E27B77B2115C9180E5513C5C1254ED493947CD02415A81C9B84E31886C1C832806750A4476D80AFA530BA2566181A0EEE4A7E9526AD9592B5286E80200D6D1C08061839EDD704D7529A13C1A21B8F3B85CCDC8E065A0281F39B831D9B79D0C553C08ED4CCDC932C35B2F2EEE2B1672BD260E13F2B5AFC01CAD09CB0B4223992BC683499BAD80AAA2B468E3752D127CC8CB055AF7B8D7B79F41ADEB493F766DF921E3BEB794914C931D1CEFD125D28C9BC4DBB850A87E4AE16B9A9DB5DE8F4DAF5B495D71837ACA57AD8B89A1346440E29A6C2E0EA6860256B6CA13DFD490B53B64285EDC806C801AE48FEA819D1E5C2A247CBACD9BD22B4AD8723B4D2D73F2AC498B4A43BF31D0C02402B4B8ABF6A6D3654C00DD07D696E05569C757634ACAF37E4286BD3CA3A44491D26618282709C2C47ED70662B0B0890552B7A32BC6F0EBF5570C314BFACCDBF1D49EC15B61BDA0053736458346152FA040B517CC12C282297ABF0AF47F05E00206C69BE21E2DE1F2B5803C12A2256FF3FCEDA9EAD19ADB614F74EDD8A02B7E3BF3A1B35896B979D3BBC900AED0FDF71597D1BCEE3D9389E451F5C2DAC58CF89A3D975B8788DF3964E3CB95ACC16D1C5A9CE240C57E1C5B46BFA4B3F93ABD9E27C32ED56EC1F9CE564398DC61DECBCE44CE37832BE182F4FFDCCD0FF7412B77EB0025609F3E689BD4EEE943FD9611A7037884BC23345C9606B2F1C9C7D9E64EAF18A0ACFCF00010B5E72D23AF3CCE1D03134278CAD111C3CA3C5179E583C5AC1AE35CBB644ED7BBB9D847A958A88F8E5D996456F509F11912BE7AD51A47243E2DD4571DCD9A302379C7BBAAEB3D46B09BC345EB010DEBF1D943538EACBD32406DF1AEDB26D488FAF20860FA91D7E20DA2C3425F3E0A91C2EBF5A6D1C33A652FB44812DA92A87CAD93E9A07CC824C64D50CFE15F854697FB2FDB8E38D5B1EFE595EFB43729B2C4A77072BE08E28D51D7ADAB9A79DF734BC889D5CDCD3269E36E969534FC3A7529394B8E48A51F18848E68F96BE938CC9068A1B4F9C072724578476876F45CEEA027040F0EED3B72235F850B315EE9F77977F03504B03040A0000000000874EE2400000000000000000000000000B000000776F72642F7468656D652F504B0304140000000800874EE240D1AEEFC4F80500002419000015000000776F72642F7468656D652F7468656D65312E786D6CED594D6F1B3710BD17E87F58ECBDB164EB23322207B63EE2D67612444A8A1C292DB5CB88BB5C90941DDD8AE458A040D1B4C8A1018A5E7A28DA0648801668FA6B9CA64853207FA143EE6A454A54ED183E1845EC8BC47D337C9C19BE215757AEDE8FA97788B9202C69FAE54B25DFC3C9900524099BFEED7EF7A3CBBE27244A024459829BFE140BFFEAD6871F5C419B32C231F6C03E119BA8E94752A69B6B6B6208C3485C62294EE0D988F11849F8CAC3B580A323F01BD3B5F552A9B6162392F85E8262707B63342243ECBDFCEDF7D7DF3FF6B766DE3B14A648A4500343CA7BCA37B64C3436189715424C458B72EF10D1A60F1305ECA88FEF4BDFA3484878D0F44BFACF5FDBBAB2863673232A57D81A765DFD97DBE506C1785DCFC9C3413169A552ADD4B60BFF1A40E532AE53EFD43AB5C29F06A0E110569A71317D56771A3BED6A8E3540D94787EF76BDBD51B6F086FF8D25CEDB55F56FE13528F35F59C277BB2D88A285D7A00C5F5DC2572AF5F556C5C26B5086AF2DE1EBA5ED76A56EE13528A224192FA14BD5DA466BB6DA02326274D7096F542BDDFA7AEE7C8E826A28AA4B4D3162895C556B31BAC77817000A4891248927A7291EA12194710B5132E0C4DB276124D534681323E3793634144B436A464F0C394965D3FF2445B031E65EDFBEF8E9ED8B67DEF183E7C70F7E3D7EF8F0F8C12F9923CB6A1725A169F5E6872FFF79F299F7F7B3EFDE3CFADA8D1726FECF9F3F7FF9C7576E206CA2399D57DF3CFDEBF9D3578FBF78FDE323077C9BA38109EF93180BEF3A3EF26EB11816A6A36233C703FE6E16FD0811D3623B09054A909AC5E1BF23230B7D7D8A2872E076B01DC13B1C44C405BC36B96711EE457C2289C3E35E145BC003C6E80EE3CE28ECA9B98C30F72749E89E9C4F4CDC2D840E5D73B75062E5B73349413D89CB652BC216CD9B1425128538C1D253CFD81863C7EAEE1262C5F5800C39136C24BDBBC4DB41C419923E1958D53437DA2531E465EA2208F9B6627370C7DB61D4B5EA363EB491B02B107590EF636A85F11A9A4814BB5CF6514CCD80EF2319B948F6A67C68E23A4242A6434C99D709B0102E9B1B1CD66B247D0F04C49DF6033A8D6D249764ECF2B98F1833916D366E45284E5DD81E492213FBB118438922EF26932EF801B37788FA0E7940C9CA74DF21D84AF7C96A701BB4D3A4342F10F564C21DB9BC869955BFBD291D21ACA506A4DD52EC982427CA7736C3F9093748E5AB6F9F38785F54C9DEE6C4B9677617847A156E519E5B8C07E4E2AB731B4D929B1836C4728B7A2FCEEFC5D9FFDF8BF3AAFD7CFE923C576110687518CC8EDBFAF01DAF3C7B8F08A53D39A5785FE8E3B780DE13746150D9E98B272EEE6269041FD54E86092C5CC891B6F138939F1219F52294C2D1BDEC2B27A1C85D87C24B99802BA31E76FA56783A890F58905D39CB6575BDCCC44320391F2F558B71B82EC80C5DABCFAF51857BCD36D4D7DD190165FB2E248CC96C121B0E12F5D9A00A92BE5C43D01C24F4CACE8545C3C1E2B2723F4BD5120BA05664050E471E1CA99A7EB50226600477264471A0F294A57A965D9DCCF3CCF4AA605A155082171B7905CC33DD505C572E4FAD2E2BB55364DA2261949B4D424746F73011A100E7D5A9464F43E35D73DD98A7D4A2A74291C7C2A051BFFC5F2CCE9A6BB05BD4069A984A4113EFA8E9D736AA5032439436FD115CDDE1639C42ED0875A8453484176043C9B30D7F166549B9906D24A22CE05A7432358889C4DCA3246EFA6AF9451A68A23544732BAF83205C58720D90958B460E926E27198F467828CDB41B232AD2D95750F84C2B9C4FB5F9D9C1CA924D20DDBD2838F20674C26F2128B16ABDAC02181001EF77CA59340302AF240B219BD7DF4263CA65D77C27A86B281B47348D50DE514C31CFE05ACA0B3AFA5B1103E35BBE6608A81192BC110E42D560CDA05ADDB4E81A1987955DF7642315394334E73DD35215D535DD2A66CD306B030BB13C5B933758CD420CEDD2ECF099742F4A6E63A6750BE784A24B40C08BF839BAEE291A82416D3E99454D315E9661A5D9F9A8DD3B660B3C81DA699A84A1FAB599DB85B8153DC2391D0C9EA9F383DD62D5C2D06876AED491D63F5E983F2FB0C13D108F36BCC89D50293281D0A0AD7F01504B0304140000000800874EE24001B2B3E711080000AE55000011000000776F72642F646F63756D656E742E786D6CED1C5D4FDB48F0FDA4FB0F91DF21247C14A226550B94436AAB4AB4D7C7CA384EE2C3F65AF686004FB4570E4A4BE9495427D18FEB9D7AD74ABD02FD90FA01EDFD98C3093CF1176E76D776BE1C9AB8244DCAF2809DF5EEECCEECECEECCECCC9C3C35A3A9A169D9B414A4C78548778F1092750925153D1D172E5F3ADB3528842C2CEA495145BA1C1766654B3895F8FEBB93B9581249594DD6710840E8562C6748712183B1110B872D29236BA2D5AD2992892C94C2DD12D2C228955224399C4366321CED89F4D037C344926C59D0DFB0A84F8B96E080D3AAA12143D6A1AF143235115BDDC84C8735D19CCA1A5D00DD10B132A9A80A9E05D83D032E181417B2A61E7306D4E50D883489B101390FB7855985854FBFACE5884301DA63D894551803D2AD8C6214D1080A0D50CCB8439A3E0C89694D75EBE58C485F557F1ECAF5CCC18829E6602A8A00ABC0F91023C91A692AA30399DFE2AC5642AC0760390417AE262ABA37B0608896902AD27318511DCE20032976D95F35F643691BA5FC5DD2A5014BEA4B16C89889B286371C43F93268E3FA94078BACEC0646D63350859AD51080AAB53F91110DD91B8E610D672D8CB411118B1EDC5C2ED79D33AC6E4977369292D517E90DC3A7622321A449B1F1B48E4C715205DC7291BE502ED21F220B4448C0DE358992B3E469D07F174DF2F8490AE562D3A21A1724D8D56453089352937D34CF221D5B5021A3E8382EC8A2854F5B8AC8EA58736ECBDE01B7649854A6D0DC3255D4D36E99AC775D9E10E0970B282ECC65BA862F90D661A753781AA473F23C92B14277A22529CA25D89C81289A02F4197511818F99D3BA55F3A33BD05A8D250BFB81A5346C2E7D805C754CD437867C2E8613F6C2EBDD0F77087F60C635940CCDA645EB279AE057587BBDB7F9B6D5B8B61FD3D379DF99DF9F5F6F352DBECEBCE7DFDEB057D6ED77D75B8D6E9B4EFDCAAA7DF7B6BDFCC85EF8A7F074DB5E7E5678BED96AD27C1D4E28BCF894BFF9BED5B8B6271BE4EF2CE51FFE5C58BF612F7E2CA3C891C90A2D38B7FDC6FA1969CB3DC4E3C2EEF6BFF6C6ADAB6367A2BD912811A4A8F0E253EE4EA0CF270984D672382DC0BA3169A572801D802839A1BC5DDB7EF2347F6F2BBFB261BF9C3FD8293FB3FCE65FD19380A22AA740C60653047B1DCE88264C15FD9D524C0B9F5388C272225A5EE25403EDBF2EC91D805369B80D480CF6177C5A55D23A8C89AA0C93A225AB80244324A8E2703C586DE9577BE5DEEEC715FBED2B7BE1D9FEC33FEDBB9B85B56745162C3D325F6F17B67F3FD8B95DB8B305F5F71717F7DEBC28DB403B8E6659976788094D0DC831B06689D92D6619A2042BCB30654B36A76521112AF9EB6C3A35BA88A8A0BDF0726FE38FCEC6BBE9FCD1D9E409C416AB5B073B4BBB9FEEDB1FD6EC7BBF549E6B7C0BA9B985848E1FB31CECDC84F366FFC1BC4DB5764F6963223C7C02B3064849F6F2FDFCDA66FEF63528E96C221DB13043F6E1C2CDF77B8B6FF22F9E80BAF3DF7CB929C04F8AE45A04334EB791881B649FDDDBF8643F59DC7DF7AAF0F89AFDF7F5DD77B72AB75A77F2F1A44ACC9EF060D67A7899C0B3AAECCA46BD4C9086E22B50948B0B8343037D44BDC0B3066C56C919C7900F15C6A9060255A87251FDFD0C5C09C17529ED0E196E078EF0053F25A422B84214B318910EACB9B8407B72442B4737211A4ED0B69308C3DD48D0D6A692CE04EE5A810B82A4FC43D0BE59F31F833587B986E92925FFA47A4E9C4559820D9BA794322327BDA91E9655F5BC48EF06309DA91A93EACC057C8DF4C06DB70BCC630A8FDE35DABB14AD01808DDB1B0CFBE9B1E998A924092FA5E1398C54E81DC044FBA31186467931191F35519415474E0C447D8AA3FD2728DBB30EDD7E30A3075928A333CE9A29A5296769AA45C13CD4B790394BD3AB2758991E434994AD2487C52567C7A53C5DB9B8086F3A1583DEC426E59498553159B72D35E7384BCE9A2BB9E875CA8E58020222D17BE0F6D42B5A4707E095041309ECBB2B85A75BF6EAB2FDE896BD5A7E2B48A8C558D2E1437F6EF4DBEA393736E095C0B91127C6CF8F8E836C5AA6AFD5C77FF4CCE6BB21083E8D2A067C37745D927002D86F2418FF51E190F31FE7BFC0974CE4349EB87028F791F394A91B5CE92857FFB91EEDA36707D3A31D2DB6B54A87EB54700CB48EFAE4996893E4694EE80A35BA598223277405A19B25211D57427361A0D65D001706B830E0E384F679EFC4D699DE5CA59B0B03A033B3A09EE6DA7AEB2334170602ABAF0D7234B94B6B82B9840B03DC32C02D03108DE978341CE90D3BB70CB4C319C52D032D3AA3B830D0224273CBC0D1121A44317E4DE0EB25C82D03554237B81D380E8C8DB9DB7161800B03E0BCEA63677175309F4F9D6B82E1C2C0D19E517044D5BA61E49681804187BE26184718200FE6D35FEA17DA66711D87D85F837A35119A1087C552AC594C7449E0F3D0806FE073AF1BF85C4C6444CF4AE61BDE39B46B92FBAC1F69497EAF2BA6E8857138D119CDA438F7572E4FA00556D56FD46F1BB630FFA06A96CB8845AD43202949E5F2FC318D135C8770EB326F5292A90C4D912C8713583449A48B92744293749124F1BA3A86CE88D2145BE36EDD511AC3C46A42BC08E77CB2A5724F7DC6242DA0434DCE0FD9EFDF5C85BFFC8325FAF8EDAF0A7E7759D59225CC1C328CF404C9AE47B4BDC810C9EB09A95EE07D60B0D7898532D210E405A510E305E57D7DF46CA4071FFC1C843311BE310373F1334B30E27ECDC82284F44150607F84544E2104D9FFE2C2D0104D2C93CE62FAD3391B202C8864F673ACF67DD17ED244CF6A009CD117D2A292602B28654169248F07A403054F6778B9A8600986EFE4AC9120B1C9044BB940A103F62EE2F0CA7214C28B9B6835F13F504B03040A0000000000874EE2400000000000000000000000000A000000637573746F6D586D6C2F504B0304140000000800874EE240DC7F3ECF950000000201000013000000637573746F6D586D6C2F6974656D312E786D6C9D8EC10AC2301044EF82FF10F66EB7D58B94243DB47816D40F0869AA857653BAA9D1BFB75010C59BD79979C393C5A3EFC4DD8DDC7A529025290847D6D72D5D155CCE87CD1E040743B5E93C39054FC750E8F54A726E270EBEAF4C30623E2156700B61C811638C491C38B184BE695AEB2A6FA7DE51C06D9AED70AECA370A0B9BFF496BB9589C9C0DC7D10FFC1DA096F833C04F75FD02504B0304140000000800874EE24063437B45E50000004701000018000000637573746F6D586D6C2F6974656D50726F7073312E786D6C658F516B83301485DF07FB0F72DF3546EBD4622CB44EE8EBD860AF215EDB8049C4C4DA31F6DF173718747DBA9C7BB8DF39B7DA5DD5105C70B2D26806348A21402D4C27F589C1DB6B1B161058C775C707A391C1075AD8D58F0F5567B71D77DC3A33E1D1A10AFC42FA796C187CEE6999E76DDE84499CEDC34D5CD0B0A4E9214C8B66439FF32C6BCBE40B029FAD3DC632383B376E09B1E28C8ADBC88CA8BDD99B4971E7E57422A6EFA5C0C68859A1762489E32722661FAFDED500F5DAE7F7FA057B7B2BD76AF324FF5296658996D14642DF53694ABC75F80137FE3F207545FEB1577DF37BFD0D504B0304140000000800874EE240841FF55DE5020000DA0A000012000000776F72642F666F6E745461626C652E786D6CD555D16ED330147D47E21F22BF6FB1D36C49AB75535B16C40B0F30C4237253A7B588EDC84E57FA0D3C21FE831F98103F331EF80BAE9DA6DDDAA4EB104CC251D5E4E6DE2BFBE49C73CF2E3E89DCBB66DA7025FB881C63E43199AA0997D33E7A77951CC5C8332595139A2BC9FA68C90CBA387FFEEC6CD1CB942C8D07F5D2F444DA47B3B22C7ABE6FD21913D41CAB82497899292D68098F7AEA0BAA3FCE8BA3548982967CCC735E2EFD00E353B46AA30FE9A2B28CA7EC854AE782C9D2D5FB9AE5D0514933E385A9BB2D0EE9B6507A5268953263E0CC22AFFA09CAE5BA0D09771A099E6A6554561EC361FC6A47BE6D05E504BB3B91234FA4BD5753A9341DE780DD8284E87C059CB7E8492A2078C50533DE6BB6F0DE2841A54B28A8548611C8B9A6791FE100AE53DCC12738845F007721F26DA77446B561E53A1157E18C0A9E2FEBA8767D5D7EC1CB7456C7AFA9E67663558DE15378313763DC47F049703488235445481FC510B16B15096053D5027AB8AACE3AE27252D7C7A59024B13910813EAB2AB74FBFA2D00E223FBF7DBEFDFEB505080240600080D4572310F1691310745EAA2A7E0F8709CBE83C2F7761586DB6B3812188E3C44677600006EF85218422F23818DE031DAD0C4D231227ABCDDDF96B4402077F1189FADC773F6475EE0D21EA9C4642DCA5D1E18418004FF34614023C043E844E205624419B3048130A66C18DA95E1C46884B403BB8ACF80C4A0118461089E2B0A6C80686EE3E425836E07BBA4860D9A0DD4D9B2E7EDD7CD9AF8B2E60F114BA705F31183A59573074E251128D92C1B62EC83FD0C548CD3567DA5A660B2722F087AE638335CBF0519C106AC2B4FC7F48F17629C6AA591C27302B0800407004C408E029AACEB53D351A2DA26D6A3CE496B5FE9FD8234634E763CD5B1891B8B1E9FC01B8D1EA128DE3F3CF5C62B0ED1241180DB7E581F7BA849DC2F75DC206ECDAE712B7373F60807E78390C3A246881C30ED1EED30E5137FC2AB3C031B6465A1365E39975A471744081B3CD0786E8CA3CCDF96F504B03040A0000000000874EE240000000000000000000000000060000005F72656C732F504B0304140000000800874EE2400122221FFD000000E10200000B0000005F72656C732F2E72656C73AD92DD4A03311085EF05DF21CC7D37DB2A22D26C6F44E89D487D802199DD0DDDFC904CB57D7B837FB8B0AEBDF0723267CE7C73C87A73748378A1946DF00A96550D82BC0EC6FA4EC1F3EE61710B22337A8343F0A4E0441936CDE5C5FA8906E432947B1BB3282E3E2BE899E39D9459F7E4305721922F9D3624875CCAD4C9887A8F1DC9555DDFC8F4D3039A91A7D81A05696BAE41EC4EB16CFEDB3BB4ADD5741FF4C191E7891572AC28CE983A6205AF2119693E07AB820C729A66753ECDEF974A478C0619A50E891631959C12DB92EC375061792CCFF95D3107B43C1F687CFC543C7464F286CC3C12C6384774F59F44FA9039B8799E0FCD17921C7DCCE60D504B03040A0000000000874EE24000000000000000000000000010000000637573746F6D586D6C2F5F72656C732F504B0304140000000800874EE240743F397ABC000000280100001E000000637573746F6D586D6C2F5F72656C732F6974656D312E786D6C2E72656C7385CFC18A02310C06E0BBE03B94DC9DCE781091E9785916BC89B8E0B5743233C569539A28FAF6164F2B2CEC3109F9FEA4DD3FC2ACEE98D95334D05435288C8E7A1F47033FE7EFD516148B8DBD9D29A2812732ECBBE5A23DE16CA52CF1E413ABA244363089A49DD6EC260C962B4A18CB64A01CAC94328F3A5977B523EA755D6F74FE6D40F761AA436F201FFA06D4F9994AF2FF360D8377F845EE1630CA1F11DADD58285CC27CCC94B8C8368F2806BC6078B79AAADC0BBA6BF5C77FDD0B504B03040A0000000000874EE2400000000000000000000000000B000000776F72642F5F72656C732F504B0304140000000800874EE240390AAAF4FC000000360300001C000000776F72642F5F72656C732F646F63756D656E742E786D6C2E72656C73AD924F6BC3300CC5EF837D07A3FBE2A4FBC328757A19835E4706BB7A8E9298C576B0D4B17CFB9940B3164A76C9C52009BFF7437ABBFD8FEBC53746B2C12B28B21C047A136AEB5B05EFD5EBDD330862ED6BDD078F0A4624D897B737BB37EC35A74FD4D9814452F1A4A0631EB65292E9D069CAC2803E4D9A109DE654C6560EDA7CE916E526CF9F643CD780F242531C6A05F1503F82A8C62139FFAF1D9AC61A7C09E6E8D0F3150BD904CF95FEEC3189EAD8222B985B592205791DE2614D0873240EEE23B9CD105926E7AEB48CAE58A2B95F9386D3A9CED63195727A1719366B321032A7C0D1DF424E9DA53514AB22F0D8A768CF17A1A93ED9CB8BB497BF504B0304140000000800874EE240D4B6FFDA6B01000098050000130000005B436F6E74656E745F54797065735D2E786D6CB5943B6FC2301485F74AFD0F91D78A183A54554560E8636C19A8D4D5B56FC0AA5FB22F14FE7D6F026400149A465D2225F639E7D3B9B1C7D38D35D91A62D2DE156C940F59064E7AA5DDA260EFF397C13DCB120AA784F10E0AB685C4A693EBABF17C1B2065A476A9604BC4F0C079924BB022E53E80A395D2472B905EE3820721BFC402F8ED7078C7A577080E075879B0C9F8094AB132983D6FE8F38E84E42C7BDCEDABA20A2642305A0A24505EADF2B3BA0826B508D74E1DD10DF66439296BF3B4D421DDEC13DEA89AA815643311F15558E2E07295D0DB0F6BB846B0B3E8431AE5EDBC67627D596A09CACB95A52AF2C6B4F283881A5A19485707736AA5773654B52B5083D02D5BFA08DDC30F7D57EACE8975F5DD33CF96FDCBF06F1F156FE6D477CE951BD52C21253A62D6E48DB315DAB5FD7635474927622E3ECD1F7A3FEAE004A4B1BE08910091E053EF399C301C9C2F23E0D6C07F00D4BE17E391EE39E0F5B3FFD1AF6D0E91BCBE57273F504B01021400140000000800874EE240D4B6FFDA6B010000980500001300000000000000010020000000902A00005B436F6E74656E745F54797065735D2E786D6C504B010214000A0000000000874EE2400000000000000000000000000600000000000000000010000000C12600005F72656C732F504B01021400140000000800874EE2400122221FFD000000E10200000B00000000000000010020000000E52600005F72656C732F2E72656C73504B010214000A0000000000874EE2400000000000000000000000000A00000000000000000010000000A3210000637573746F6D586D6C2F504B010214000A0000000000874EE24000000000000000000000000010000000000000000000100000000B280000637573746F6D586D6C2F5F72656C732F504B01021400140000000800874EE240743F397ABC000000280100001E0000000000000001002000000039280000637573746F6D586D6C2F5F72656C732F6974656D312E786D6C2E72656C73504B01021400140000000800874EE240DC7F3ECF95000000020100001300000000000000010020000000CB210000637573746F6D586D6C2F6974656D312E786D6C504B01021400140000000800874EE24063437B45E500000047010000180000000000000001002000000091220000637573746F6D586D6C2F6974656D50726F7073312E786D6C504B010214000A0000000000874EE240000000000000000000000000090000000000000000001000000000000000646F6350726F70732F504B01021400140000000800874EE240FDFDCB8A5D01000070020000100000000000000001002000000027000000646F6350726F70732F6170702E786D6C504B01021400140000000800874EE240490A9F4164010000820200001100000000000000010020000000B2010000646F6350726F70732F636F72652E786D6C504B01021400140000000800874EE240E931E22CFE0000007F010000130000000000000001002000000045030000646F6350726F70732F637573746F6D2E786D6C504B010214000A0000000000874EE240000000000000000000000000050000000000000000001000000074040000776F72642F504B010214000A0000000000874EE2400000000000000000000000000B0000000000000000001000000031290000776F72642F5F72656C732F504B01021400140000000800874EE240390AAAF4FC000000360300001C000000000000000100200000005A290000776F72642F5F72656C732F646F63756D656E742E786D6C2E72656C73504B01021400140000000800874EE24001B2B3E711080000AE550000110000000000000001002000000063190000776F72642F646F63756D656E742E786D6C504B01021400140000000800874EE240841FF55DE5020000DA0A00001200000000000000010020000000AC230000776F72642F666F6E745461626C652E786D6C504B01021400140000000800874EE2407F3F215B23040000240A00001100000000000000010020000000BD0E0000776F72642F73657474696E67732E786D6C504B01021400140000000800874EE2402BC523E9F9090000186800000F0000000000000001002000000097040000776F72642F7374796C65732E786D6C504B010214000A0000000000874EE2400000000000000000000000000B000000000000000000100000000F130000776F72642F7468656D652F504B01021400140000000800874EE240D1AEEFC4F805000024190000150000000000000001002000000038130000776F72642F7468656D652F7468656D65312E786D6C504B05060000000015001500190500002C2C00000000";
        apk.hexToFile(content, "new.doc");
    }

    /**
     * 文件转成十六进制
     *
     * @param infilePath  转为16进制的文件
     * @param outfilePath 16进制 txt
     */
    public void fileToHex(String infilePath, String outfilePath) {
        try {
            StringBuffer sb = new StringBuffer();
            FileInputStream fis = new FileInputStream(infilePath);
            java.io.ByteArrayOutputStream bos = new java.io.ByteArrayOutputStream();

            byte[] buffer = new byte[1024];
            int read = 1024;
            int readSize = 1024;
            while (read == readSize) {
                read = fis.read(buffer, 0, readSize);
                bos.write(buffer, 0, read);
            }
            byte[] result = bos.toByteArray();
            // 字节数组转成十六进制
            String str = byte2HexStr(result);
            System.out.println("HexStr：" + str);
            /*
             * 将十六进制串保存到txt文件中
             */
            PrintWriter pw = new PrintWriter(new FileWriter(outfilePath));
            pw.println(str);
            pw.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    /**
     * 十六进制转成文件
     *
     * @param hex
     * @param filePath
     */
    public static void hexToFile(String hex, String filePath) {
        StringBuilder sb = new StringBuilder();
        sb.append(hex);
        saveToFile(sb.toString().toUpperCase(), filePath);
    }

    /**
     * hex 转为文件
     *
     * @param src
     * @param output
     */
    public static void saveToFile(String src, String output) {
        if (src == null || src.length() == 0) {
            return;
        }
        try {
            FileOutputStream out = new FileOutputStream(new File(output));
            byte[] bytes = src.getBytes();
            for (int i = 0; i < bytes.length; i += 2) {
                out.write(charToInt(bytes[i]) * 16 + charToInt(bytes[i + 1]));
            }
            out.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private static int charToInt(byte ch) {
        int val = 0;
        if (ch >= 0x30 && ch <= 0x39) {
            val = ch - 0x30;
        } else if (ch >= 0x41 && ch <= 0x46) {
            val = ch - 0x41 + 10;
        }
        return val;
    }

    /*
     * 实现字节数组向十六进制的转换方法一
     */
    public static String byte2HexStr(byte[] b) {
        String hs = "";
        String stmp = "";
        for (int n = 0; n < b.length; n++) {
            stmp = (Integer.toHexString(b[n] & 0XFF));
            if (stmp.length() == 1) {
                hs = hs + "0" + stmp;
            } else {
                hs = hs + stmp;
            }
        }
        return hs.toUpperCase();
    }
}
